Optimal. Leaf size=32 \[ \frac{a B \sin (c+d x)}{d}+a x (B+C)+\frac{a C \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0969974, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.079, Rules used = {4072, 3996, 3770} \[ \frac{a B \sin (c+d x)}{d}+a x (B+C)+\frac{a C \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4072
Rule 3996
Rule 3770
Rubi steps
\begin{align*} \int \cos ^2(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos (c+d x) (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=\frac{a B \sin (c+d x)}{d}-\int (-a (B+C)-a C \sec (c+d x)) \, dx\\ &=a (B+C) x+\frac{a B \sin (c+d x)}{d}+(a C) \int \sec (c+d x) \, dx\\ &=a (B+C) x+\frac{a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a B \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0237102, size = 46, normalized size = 1.44 \[ \frac{a B \sin (c) \cos (d x)}{d}+\frac{a B \cos (c) \sin (d x)}{d}+a B x+\frac{a C \tanh ^{-1}(\sin (c+d x))}{d}+a C x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.069, size = 56, normalized size = 1.8 \begin{align*} aBx+aCx+{\frac{Ba\sin \left ( dx+c \right ) }{d}}+{\frac{Bac}{d}}+{\frac{aC\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Cac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.936515, size = 78, normalized size = 2.44 \begin{align*} \frac{2 \,{\left (d x + c\right )} B a + 2 \,{\left (d x + c\right )} C a + C a{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, B a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.508625, size = 139, normalized size = 4.34 \begin{align*} \frac{2 \,{\left (B + C\right )} a d x + C a \log \left (\sin \left (d x + c\right ) + 1\right ) - C a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.17508, size = 107, normalized size = 3.34 \begin{align*} \frac{C a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - C a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) +{\left (B a + C a\right )}{\left (d x + c\right )} + \frac{2 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]